import React, { ReactElement, FC } from 'react';
import {
    Navigate
} from "react-router-dom";

const Index = (props: any) => localStorage.getItem("token") ? props.children : <Navigate to={"/login"}></Navigate>;

export default Index;